
<div class="modal-header">
    <h4 class="modal-title">销售品信息</h4>
</div>
<div class="modal-body">
    <div class="container-fluid form-horizontal ">

<div class="col-xs-12 " >
	<div class="panel panel-default form-horizontal">
		<div class="panel-heading">
			基本信息
			<button type="button" 
				class="btn btn-xs btn-info pull-right"
				ng-show="what == '' || what == 'edit'"
				ng-click="go()"
			>
				<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
			</button>
		</div>
		<div class="panel-body">
			<div class="container-fluid">
				
				<div class="col-xs-12 col-md-12" >

					<div class="form-group">
						<label class="col-xs-3 control-label">销售品名称</label>
						<div class="col-xs-9">
							<input type="text" class="form-control" placeholder="请输入销售品名称"
							ng-model="obj.name"
							>
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">销售品副标题</label>
						<div class="col-xs-9">
							<textarea class="form-control" rows="1"
							ng-model="obj.describe"
							></textarea>
						</div>
					</div>

					<div class="form-group" >
						<label class="col-xs-3 control-label">所属商家</label>
						<!--<div class="col-xs-9" >
							<select class="form-control" ng-model="obj.business_code"
				              ng-options="business.code as business.name for business in businessarr"
				            >
				            </select>
						</div>-->
						<div class="col-md-9">
		   					<ui-select ng-model="searchform.selected" theme="bootstrap">
								<ui-select-match placeholder="请选择一个商家">{{$select.selected.name}}</ui-select-match>
								<ui-select-choices group-by="'place_name'" repeat="item in businessarr | filter: $select.search">
									<span ng-bind-html="item.name | highlight: $select.search"></span>
									<!--<small ng-bind-html="item.code | highlight: $select.search"></small>-->
								</ui-select-choices>
		                    </ui-select>				
   						</div> 
					</div>

					<div class="form-group" >
						<label class="col-xs-3 control-label">销售品类别</label>
						<div class="col-xs-9" >
							<select class="form-control" ng-model="obj.type"
				              ng-options="type1.code as type1.label for type1 in typearr"
				            >
				            </select>
						</div>
					</div>

					

					<div class="form-group">
						<label class="col-xs-3 control-label">居游价格</label>
						<div class="col-xs-9">
							<div class="input-group">
								<input type="number" class="form-control" placeholder="请输入指导价格" min='0'
								ng-model="obj.voucher_price"
								>
								<span class="input-group-addon">分</span>
							</div>
						</div>
					</div>

					<div class="form-group" >
						<label class="col-xs-3 control-label">销售品星级</label>
						<div class="col-xs-9" >
							<select class="form-control" ng-model="obj.star">
								<option value='1'>1</option>
								<option value='2'>2</option>
								<option value='3'>3</option>
								<option value='4'>4</option>
								<option value='5'>5</option>
				            </select>
						</div>
					</div>

					<div class="form-group" >
						<label class="col-xs-3 control-label">有效期</label>
	                    <div class="col-xs-9">
		                	<div class="pull-left input-group">
								<input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="date.opened" 
									readonly close-text="关闭" current-text="今天" clear-text="清除" />
								<span class="input-group-btn">
									<button type="button" class="btn btn-default"
											ng-click="dateOpen($event, date)">
										<i class="glyphicon glyphicon-calendar"></i>
									</button>
								</span>
							</div>
		                </div>
                    </div>

                    <div class="form-group">
						<label class="col-xs-3 control-label">关注度</label>
						<div class="col-xs-9">
							<input type="text" class="form-control" placeholder="排序用" value="0"
							ng-model="obj.attention_degree"
							>
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">颜色</label>
						<div class="col-xs-9">
							<input type="color" class="form-control" placeholder="" value="#ff0080" 
							ng-model="obj.color"
							>
						</div>
					</div>

				  	<div class="form-group">
						<label class="col-xs-3 control-label">销售品主图</label>
						<div class="col-xs-3">
							<img ng-src="{{obj.img}}" width="250" height="150" ng-model="obj.img">
							<input type="file" nv-file-select uploader="uploader1" />
							<br>
							<ul class="list-group">
							    <li class="list-group-item" ng-repeat="item in uploader1.queue">
							        文件名: <span ng-bind="item.file.name"></span>
							        <button type="button" class="btn btn-default btn-xs"  ng-click="item.upload()"><span class="glyphicon glyphicon-upload"></span> 上传</button>
							        <div class="progress mt10">
							            <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader1.progress + '%' }"></div>
							        </div>
							    </li>
							</ul>
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">销售品副图</label>
						<div class="col-xs-3">
							<img ng-src="{{obj.img1}}" width="180" height="150" ng-model="obj.img1">
							<input type="file" nv-file-select uploader="uploader2" />
							<br>
							<ul class="list-group">
							    <li class="list-group-item" ng-repeat="item in uploader2.queue">
							        文件名: <span ng-bind="item.file.name"></span>
							        <button type="button" class="btn btn-default btn-xs"  ng-click="item.upload()"><span class="glyphicon glyphicon-upload"></span> 上传</button>
							        <div class="progress mt10">
							            <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader2.progress + '%' }"></div>
							        </div>
							    </li>
							</ul>
						</div>
						<div class="col-xs-3">
							<img ng-src="{{obj.img2}}" width="180" height="150" ng-model="obj.img2">
							<input type="file" nv-file-select uploader="uploader3" />
							<br>
							<ul class="list-group">
							    <li class="list-group-item" ng-repeat="item in uploader3.queue">
							        文件名: <span ng-bind="item.file.name"></span>
							        <button type="button" class="btn btn-default btn-xs"  ng-click="item.upload()"><span class="glyphicon glyphicon-upload"></span> 上传</button>
							        <div class="progress mt10">
							            <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader3.progress + '%' }"></div>
							        </div>
							    </li>
							</ul>
						</div>
						<div class="col-xs-3">
							<img ng-src="{{obj.img3}}" width="180" height="150" ng-model="obj.img3">
							<input type="file" nv-file-select uploader="uploader4" />
							<br>
							<ul class="list-group">
							    <li class="list-group-item" ng-repeat="item in uploader4.queue">
							        文件名: <span ng-bind="item.file.name"></span>
							        <button type="button" class="btn btn-default btn-xs"  ng-click="item.upload()"><span class="glyphicon glyphicon-upload"></span> 上传</button>
							        <div class="progress mt10">
							            <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader4.progress + '%' }"></div>
							        </div>
							    </li>
							</ul>
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">一元券描述</label>
						<div class="col-xs-9">
							<textarea class="form-control" rows="3"
							ng-model="obj.voucher_describe"
							></textarea>
						</div>
					</div>

					<div class="form-group">
					    <label class="col-xs-3 control-label">一元券类别</label>
					    <div class="col-xs-9">
					    	<label class="radio-inline">
							  <input type="radio" name="voucher_type" value="1"
							  ng-model="obj.voucher_type"
							  > 折扣
							</label>
							<label class="radio-inline">
							  <input type="radio" name="voucher_type" value="2"
							  ng-model="obj.voucher_type"
							  > 定值
							</label>
							<label class="radio-inline">
							  <input type="radio" name="voucher_type" value="3"
							  ng-model="obj.voucher_type"
							  > 部分减值
							</label>
							<label class="radio-inline">
							  <input type="radio" name="voucher_type" value="4"
							  ng-model="obj.voucher_type"
							  > 部分折扣
							</label>
					    </div>
				  	</div>

				  	<div class="form-group" ng-show = "obj.voucher_type == 2">
						<label class="col-xs-3 control-label">商品定值价</label>
						<div class="col-xs-9">
							<div class="input-group">
								<input type="number" class="form-control"  min='0'
								ng-model="obj.guide_price"
								>
								<span class="input-group-addon">分</span>
							</div>
						</div>
					</div>

				  	<div class="form-group" ng-show = "obj.voucher_type == 3">
						<label class="col-xs-3 control-label">一元券满金</label>
						<div class="col-xs-9">
							<div class="input-group">
								<input type="number" class="form-control"  placeholder="例如:满100减20 则输入10000" min='0' 
								ng-model="obj.voucher_full_price"
								>
								<span class="input-group-addon">分</span>
							</div>
						</div>
					</div>

				  	<div class="form-group">
						<label class="col-xs-3 control-label">一元券优惠</label>
						<div class="col-xs-9">
							<input type="text" class="form-control" placeholder="例如:8.8折 则输入0.88, 定值或减值5元 则输入500"
							ng-model="obj.voucher_discount"
							>
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">销售品简介</label>
						<div class="col-xs-9">
							<!-- <textarea class="form-control" rows="3"
							ng-model="obj.content"
							></textarea> -->
							<!-- <div text-angular ng-model="obj.content"></div> -->
							<div class="ueditor" ng-model="obj.content"></div>      

						</div>
					</div>

				  	<div class="form-group">
						<label class="col-xs-3 control-label">图文详情</label>
						<div class="col-xs-9">
							<!-- <div text-angular ng-model="obj.detail"></div> -->
							<div class="ueditor" ng-model="obj.detail"></div>      
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-3 control-label">购买须知</label>
						<div class="col-xs-9">
							<!-- <div text-angular ng-model="obj.notice"></div> -->
							<div class="ueditor" ng-model="obj.notice"></div>      
						</div>
					</div>

				</div>


			</div>
		</div>
	</div>
</div>

